CREATE TABLE [dbo].[TTTIPO_VETE]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[TI_VENT] [dbo].[TD_VC_003] NOT NULL,
[DE_TIPO_VENT] [dbo].[TD_VC_050] NULL,
[PO_COMI] [dbo].[TD_NU_009_004] NULL CONSTRAINT [DF__TTTIPO_VE__PO_CO__021E29CA] DEFAULT ((0)),
[CO_MONE] [dbo].[TD_VC_003] NULL,
[ST_APLI_LINE] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_VE__ST_AP__03124E03] DEFAULT ('N'),
[ST_FACT_FIJO] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_VE__ST_FA__04FA9675] DEFAULT ('N'),
[ST_COMI_COBR] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_VE__ST_CO__06E2DEE7] DEFAULT ('N'),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTTIPO_VE__CO_US__08CB2759] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTTIPO_VE__FE_US__09BF4B92] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTTIPO_VE__CO_US__0AB36FCB] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTTIPO_VE__FE_US__0BA79404] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTTIPO_VETE] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_VE__ST_AP__0406723C] CHECK NOT FOR REPLICATION (([ST_APLI_LINE]='N' OR [ST_APLI_LINE]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_VETE] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_VE__ST_CO__07D70320] CHECK NOT FOR REPLICATION (([ST_COMI_COBR]='N' OR [ST_COMI_COBR]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_VETE] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_VE__ST_FA__05EEBAAE] CHECK NOT FOR REPLICATION (([ST_FACT_FIJO]='N' OR [ST_FACT_FIJO]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_VETE] ADD CONSTRAINT [PK__TTTIPO_V__0CDCF35F495AADBA] PRIMARY KEY CLUSTERED  ([CO_EMPR], [TI_VENT]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTTIPO_VETE] ADD CONSTRAINT [FK__TTTIPO_VE__CO_EM__7D6461A5] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
